package com.guaoran.interview.in2018.basictypes;

/**
 * @Author gucheng
 * @Description todo 加注释
 * 2019-08-13 9:40
 */
public class LongDemo {
    public static void main(String[] args) {
        printLong();
        printlong();
        System.out.println("+++++++++++++++++++++++++++++");
        printLong();
        printlong();

    }

    public static void printLong(){
        long time = System.currentTimeMillis();
        for (int ii = 0; ii < 10; ii++) {
            Long sum = 0L;
            for (long i = 0; i < Integer.MAX_VALUE; i++) {
                sum += i;
            }
        }
        System.out.println("print_Long"+(System.currentTimeMillis()-time));
    }
    public static void printlong(){
        long time = System.currentTimeMillis();
        long sum = 0L;
        for (int ii = 0; ii < 10; ii++) {
            for (long i = 0; i < Integer.MAX_VALUE; i++) {
                sum += i;
            }
        }
        System.out.println("print_long"+(System.currentTimeMillis()-time));
    }
}
